package com.vvv.controller;

import com.vvv.domain.Result;
import com.vvv.domain.User;
import com.vvv.service.LoginService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author vvv
 * @date 2023-06-11 15 03
 * discription
 */
@RestController
@RequestMapping("/user")
public class LoginController {

    @Resource
    private LoginService loginService;

    @GetMapping("/login")
    public Result login(@RequestBody User user) {
        return loginService.login(user);
    }
}
